package cn.com.huzo.model.entities.trade;

import huzofw.model.entities.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 生产指示书主记录实体类
 *
 * @author 吴旭
 */
public class ProductionInstructionHeaderEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 2807777402091139064L;
    private Long HeaderId;
    private String ContractNo;                   // 合同号
    private String SuitStyleNo;                  // 款号（套装)
    private String SuitProductId;                // 套装复合款对应的产品标识
    private String SuitProductName;              // 套装复合款对应的产品名
    private String CustomerName;                 // 客户名
    private Timestamp IssueDate;                 // 下达日期
    private Long SaledBy;                        // 贸易担当ID
    private String SaledByName;                  // 贸易担当
    private Long TradeModeId;
    private String TradeModeName;                // 贸易方式
    private Long SettlementModeId;
    private String SettlementModeName;           // 结算方式
    private String Description;                  // 备注
    private Boolean OverFlag;                    // 完成标记
    private Integer Quantity;                    // 总数量
    private Boolean QuotedFlag;                  // 被物料需求计划引用标记
    private Long[] SuitProductIdList;            // 款号(用于保存数据)
    private Integer TotalQuantity;               // 合同数
    private Integer SampleQuantity;              // 样品数
    private String ShippingSchedule;             // 船期，多个用、隔开

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public String getContractNo() {
        return ContractNo;
    }

    public void setContractNo(String ContractNo) {
        this.ContractNo = ContractNo;
    }

    public String getSuitStyleNo() {
        return SuitStyleNo;
    }

    public void setSuitStyleNo(String SuitStyleNo) {
        this.SuitStyleNo = SuitStyleNo;
    }

    public String getSuitProductId() {
        return SuitProductId;
    }

    public void setSuitProductId(String SuitProductId) {
        this.SuitProductId = SuitProductId;
    }

    public String getSuitProductName() {
        return SuitProductName;
    }

    public void setSuitProductName(String SuitProductName) {
        this.SuitProductName = SuitProductName;
    }

    public String getCustomerName() {
        return CustomerName;
    }

    public void setCustomerName(String CustomerName) {
        this.CustomerName = CustomerName;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getIssueDate() {
        return IssueDate;
    }

    public void setIssueDate(Timestamp IssueDate) {
        this.IssueDate = IssueDate;
    }

    public Long getSaledBy() {
        return SaledBy;
    }

    public void setSaledBy(Long SaledBy) {
        this.SaledBy = SaledBy;
    }

    public String getSaledByName() {
        return SaledByName;
    }

    public void setSaledByName(String SaledByName) {
        this.SaledByName = SaledByName;
    }

    public Long getTradeModeId() {
        return TradeModeId;
    }

    public void setTradeModeId(Long TradeModeId) {
        this.TradeModeId = TradeModeId;
    }

    public String getTradeModeName() {
        return TradeModeName;
    }

    public void setTradeModeName(String TradeModeName) {
        this.TradeModeName = TradeModeName;
    }

    public Long getSettlementModeId() {
        return SettlementModeId;
    }

    public void setSettlementModeId(Long SettlementModeId) {
        this.SettlementModeId = SettlementModeId;
    }

    public String getSettlementModeName() {
        return SettlementModeName;
    }

    public void setSettlementModeName(String SettlementModeName) {
        this.SettlementModeName = SettlementModeName;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    public Boolean getOverFlag() {
        return OverFlag;
    }

    public void setOverFlag(Boolean OverFlag) {
        this.OverFlag = OverFlag;
    }

    public Integer getQuantity() {
        return Quantity;
    }

    public void setQuantity(Integer Quantity) {
        this.Quantity = Quantity;
    }

    public Boolean getQuotedFlag() {
        return QuotedFlag;
    }

    public void setQuotedFlag(Boolean QuotedFlag) {
        this.QuotedFlag = QuotedFlag;
    }

    public Long[] getSuitProductIdList() {
        return SuitProductIdList;
    }

    public void setSuitProductIdList(Long[] SuitProductIdList) {
        this.SuitProductIdList = SuitProductIdList;
    }

    public Integer getTotalQuantity() {
        return TotalQuantity;
    }

    public void setTotalQuantity(Integer TotalQuantity) {
        this.TotalQuantity = TotalQuantity;
    }

    public Integer getSampleQuantity() {
        return SampleQuantity;
    }

    public void setSampleQuantity(Integer SampleQuantity) {
        this.SampleQuantity = SampleQuantity;
    }

    public String getShippingSchedule() {
        return ShippingSchedule;
    }

    public void setShippingSchedule(String ShippingSchedule) {
        this.ShippingSchedule = ShippingSchedule;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof ProductionInstructionHeaderEntity)) {
            return false;
        }

        final ProductionInstructionHeaderEntity that = (ProductionInstructionHeaderEntity) o;

        return new EqualsBuilder()
                .append(this.getHeaderId(), that.getHeaderId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getHeaderId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
